//
//  KHBlueToothHelper.h
//  KissHealth
//
//  Created by bingo on 2019/1/8.
//  Copyright © 2019 Mark. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

//static NSString * const 

/// 体脂
static NSString * const kBodyFatServiceUUID = @"FFF0";
static NSString * const kBodyFatReadCharacteristicUUID = @"FFF4";
static NSString * const kBodyFatWriteCharacteristicUUID = @"FFF3";
static NSString * const kBodyFatNotificationUUID = @"2902";

/// 血糖胆固醇
static NSString * const kBloodServiceUUID = @"1000";
static NSString * const kBloodReadCharacteristicUUID = @"1002";
static NSString * const kBloodNotificationUUID = @"2902";

/// 血压
static NSString * const kBloodPreServiceUUID = @"1808";
static NSString * const kBloodPreWriteCharacteristicUUID = @"FFF2";
static NSString * const kBloodPreReadCharacteristicUUID = @"FFF4";
static NSString * const kBloodPreNotificationUUID = @"2902";


static NSString * const kBodyFatIdentifier = @"bodyFat";               /// 体脂
static NSString * const kBloodPressureIdentifier = @"bloodPre";        /// 血压
static NSString * const kBloodGlucoseIdentifier = @"bloodGlucose";     /// 血糖
static NSString * const kCholIdentifier = @"chol";                     /// 胆固醇

typedef NS_ENUM(NSInteger, KHPeripheralType){
    KHPeripheralTypeBodyFat,                    /// 体脂
    KHPeripheralTypeBloodPressure,              /// 血压
    KHPeripheralTypeBloodGlucose,               /// 血糖
    KHPeripheralTypeChol,                       /// 胆固醇
};

@interface KHBlueToothHelper : NSObject

/// 获取当前时间
+ (NSString *)getCurrentDateTime;

/// 对应的测量类型
+ (KHPeripheralType)peripheralTypeForMeter:(NSString *)meterString;

/// 测量类型对应的字符串
+ (NSString *)meterStringForPeripheralType:(KHPeripheralType)type;

#pragma mark - transfer tool
/// 十六进制Data转换成字符串
+ (NSString *)hexStringWithData:(NSData *)data;

/// 十六进制字符串转数字
+ (NSInteger)numberWithHexString:(NSString *)hexString;

/// 字符串转成十六进制data
+ (NSData*)stringToByte:(NSString*)string;


#pragma mark - 打开蓝牙弹窗
+ (void)showOpenBlueToothAlert;


@end

NS_ASSUME_NONNULL_END
